import { getRepairListAPI } from "../../../apis/list"

Page({
  data: {
    repairList: [],
    statusMap: {
      0: '已取消',
      1: '受理中',
      3: '已完成',
      2: '上门中'
    },

  },

  goDetail(val) {
    wx.navigateTo({
      url: '/repair_pkg/pages/detail/index?id=' + val.mark.id,
    })
  },
  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
  async onLoad() {
    const res = await getRepairListAPI(1, 10)
    this.setData({
      repairList: res.data.rows
    })
  }
})
